jQuery.extend({
	"yzfangfa":function(errorinformation,absolutetop,parentclass){
					var absolutetop2 ;
					if (isNaN(absolutetop)) {
						absolutetop2=0;
					}else{
						absolutetop2=absolutetop;
					}
					var errorbox = $("<div class='errorbox' style='top: "+absolutetop2+"px;'></div>");
					var xxbox = $("<span class='xxbox'>◆</span>");
					var errorimg = $("<span class='errorimg'></span>");
					var errorinfor = $("<span class='errorinfor'>"+errorinformation+"</span>");
					var errorclose = $("<span class='errorclose'></span>");
					errorclose.on('click', function() {
						errorclose.parent(".errorbox").remove();
					});
					xxbox.appendTo(errorbox);
					errorimg.appendTo(errorbox);
					errorinfor.appendTo(errorbox);
					errorclose.appendTo(errorbox);
					errorbox.appendTo($("."+parentclass));
					
				
	},
	isCnNewID:function(cid) {
					var arrExp = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; //加权因子  
					var arrValid = [1, 0, "X", 9, 8, 7, 6, 5, 4, 3, 2]; //校验码  
					if(/^\d{17}\d|x$/i.test(cid)) {
						var sum = 0,idx;
						for(var i = 0; i < cid.length - 1; i++) {
							// 对前17位数字与权值乘积求和    
							sum += parseInt(cid.substr(i, 1), 10) * arrExp[i];
						}
						// 计算模（固定算法）  
						idx = sum % 11;
						// 检验第18为是否与校验码相等  
						console.log(arrValid[idx] == cid.substr(17, 1).toUpperCase());
						return arrValid[idx] == cid.substr(17, 1).toUpperCase();
						
					} else {
						return false;
					}
	}
});